<template>
	<div class="goods-list-item">
		<a href="" class="goods-href">
			<img :src="goodsItem.img" alt="">
			<div class="goods-info">
				<p>{{goodsItem.title}}</p>
				<span class="price">${{goodsItem.sale}}</span>
				<span class="collect"><!-- <img src="~@/assets/png/commom/favorite.svg" alt=""> -->{{goodsItem.cfav}}</span>
			</div>
		</a>
	</div>
</template>

<script>
	export default {
		name: 'GoodsListItem',
		props: {
			goodsItem: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {

			}
		}

	}
</script>

<style>
	.goods-list-item {
		text-align: center;
		width: 48%;
	}

	.goods-href {
		position: relative;
	}

	.goods-list-item img {
		width: 100%;
		height: auto;
		padding-bottom: 40px;
		border-radius: 5px;
	}

	.goods-info {
		position: absolute;
		right: 0;
		left: 0;
		bottom: 5px;
	}

	.goods-info p {
		font-size: 14px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.goods-info .price {
		margin-right: 20px;
		color: var(--color-high-text);
	}
	.goods-info .collect {
	}
	
	.goods-info .collect img {
		border-style: none;
		height: 14px;
		width: 14px;
	}
</style>
